import { post } from "../http";

//登录
export type LoginReq = {
  username: string;
  password: string;
};

export type LoginRep = {
  token: string;
};

export const login = async (data: LoginReq):Promise<LoginRep> =>
  await post(`/api/user/login`, data);
